import Ajax from 'api/customajax'
export default {
  // 所有的本地图标数据
  // getAllIcons() {
  //   const url = '/dirms/monitor/icons/all';
  //   return Ajax.query(url);
  // },
  // delIconDataById(params){
  //   const url ="/dirms/monitor/icons/delete/"+params.id;
  //   return Ajax.delete(url,params);
  // },
  delSysIconDataById(sysimageid){
    const url ="/dirms/monitor/image/delete/" + sysimageid;
    return Ajax.save(url);
  },
  //分页查询图标数据
  // pageQueryIconsData(params={},pageIndex=1,pageSize=10){
  //   const url ="/dirms/monitor/icons/pagequery";
  //   return Ajax.pageQuery(url,params,pageIndex,pageSize);
  // },
  pageQuerySysimageData(pageNo, pageSize) {
    const url = '/dirms/monitor/image/pagequery/' + pageNo + '/' + pageSize;
    return Ajax.query(url);
  },
  //获取到 zabbix 中自带的系统图标数据
  getAllSysIcons(){
    const url ="/dirms/monitor/image/all";
    return Ajax.query(url);
  },
  getImageAndHostid() {
    const url = "/dirms/monitor/image/getImageAndHostid";
    return Ajax.query(url);
  },
  syncQueryTopoIconData(topoId, callback) {
    const url = "/dirms/monitor/image/getByMapid/" + topoId;
    return Ajax.syncQuery(url, {}, callback);
  }
}
